home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
DELPHI32
/
GRAPHICS
/
IMGLIB95
/
U_GL_PAL.PA_
/
U_GL_PAL.PA
Wrap
Text File
|
1996-03-31
|
2KB
|
91 lines
{
Written by Jan Dekkers and Kevin Adams (c) 1995, 1996. If you are a non
registered client, you may use or alter this demo only for evaluation
purposes.
Copyright by SkyLine Tools. All rights reserved.
Part of Imagelib VCL/DLL Library.
}
unit U_gl_pal;
{Includes settings to compile in either 16 or 32 bit}
{$I DEFILIB.INC}
interface
uses
{$IFDEF DEL32}
Windows,
{$ELSE}
WinTypes,
WinProcs,
{$ENDIF}
DLL95V1, {ImageLib Dll interface and misc. functions}
Classes,
Graphics,
Forms,
Controls,
Buttons,
StdCtrls,
MMOpen, {Visual OpenDialog box}
TMultiP; {PMultiImage VCL component}
type
TGPaletteD = class(TForm)
PMultiImage2: TPMultiImage;
PMultiImage1: TPMultiImage;
MMOpenDialog1: TMMOpenDialog;
CheckBox1: TCheckBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Memo1: TMemo;
procedure CheckBox1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
GPaletteD: TGPaletteD;
implementation
{$R *.DFM}
{------------------------------------------------------------------------}
procedure TGPaletteD.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked then
GlobalPalette:=PMultiImage1.Picture.Bitmap.Palette
else
GlobalPalette:=0;
end;
{------------------------------------------------------------------------}
procedure TGPaletteD.BitBtn1Click(Sender: TObject);
begin
if MMOpenDialog1.Execute then
PMultiImage1.Imagename:=MMOpenDialog1.FileName;
end;
{------------------------------------------------------------------------}
procedure TGPaletteD.BitBtn2Click(Sender: TObject);
begin
if CheckBox1.Checked then
GlobalPalette:=PMultiImage1.Picture.Bitmap.Palette
else
GlobalPalette:=0;
if MMOpenDialog1.Execute then
PMultiImage2.Imagename:=MMOpenDialog1.FileName;
end;
{------------------------------------------------------------------------}
end.